Skip to content

fix(macos): harden renderer visibility verification - #283

Open
rwang23 wants to merge 1 commit into
Fei-Away:mainfrom
rwang23:agent/audit-macos-renderer-visibility
Open

fix(macos): harden renderer visibility verification#283
rwang23 wants to merge 1 commit into
Fei-Away:mainfrom
rwang23:agent/audit-macos-renderer-visibility

Conversation

@rwang23

@rwang23 rwang23 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary / 摘要

  • Harden macOS renderer readiness so sized DOM nodes are not automatically treated as visible.
  • Retry transient Runtime.evaluate failures during document swaps within the existing bounded deadline.

Type / 类型

  • Bug fix / 缺陷修复
  • Feature / 新功能
  • Docs / 文档
  • Theme / CSS / visual / 主题或视觉
  • Scripts / install / restore / 脚本或安装恢复
  • Chore / 杂项

Platform / 平台

  • macOS
  • Windows
  • Both / 双平台
  • Docs / repo only / 仅文档或仓库元数据

Self-check / 自测

macOS (when code under macos/ changes)

  • macos/tests/run-tests.sh passed / 已通过
  • Doctor (optional): macos/scripts/doctor-macos.sh
  • Live verify (if inject/CSS/start path): verify-dream-skin-macos.sh or Desktop Verify
  • Restore / re-apply smoke (if install/restore/start changed) / 若改了安装恢复启动则做过恢复再应用

User-facing / 用户可见变更

  • Updated macos/CHANGELOG.md (and macos/VERSION if release-worthy) / 已更新 changelog(发版时再 bump VERSION)
  • N/A — no user-facing change / 无用户可见变更

Security / 安全

  • Does not modify official Codex install / asar / signatures / 未修改官方安装与签名
  • Does not silently write API Base URL or keys / 未静默写入 API Base URL 或 Key
  • CDP remains loopback-oriented (127.0.0.1) where applicable / CDP 仍仅本机回环(如适用)

Notes / 补充

Root cause: the previous box() check accepted any nonzero-size node unless it
had display:none or visibility:hidden, and one transient evaluation error
aborted the entire verify loop.

Changes reject detached, opacity-zero, CSS-hidden, content-visibility:hidden,
and offscreen anchors; use checkVisibility() when present; and retry until the
existing deadline expires.

Validated on main@611c101 with:

  • node --test macos/tests/renderer-verification.test.mjs — passed (4 tests)
  • Git Bash syntax check of every macos/scripts/*.sh — passed
  • git diff --check — passed

The full portable macOS Node suite was attempted on this Windows host. Its new
test passed, while three pre-existing platform-dependent tests could not run
because Windows denied symlink creation or lacks /bin/bash; macOS CI and a
real Verify smoke remain required.

Tracking issue / 追踪 Issue

Closes #294

@rwang23
rwang23 marked this pull request as ready for review July 27, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][macOS]: Renderer readiness accepts non-visible nodes

1 participant